package com.kotlin.hxh.ui.fragment.first

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.kotlin.hxh.R
import com.kotlin.hxh.base.BaseMainFragment
import com.kotlin.hxh.ui.fragment.first.child.FirstHomeFragment

/**
 * @author huxh
 * @date 2018/12/15.
 */
class ZhihuFirstFragment : BaseMainFragment() {
    companion object {
        fun newInstance(): ZhihuFirstFragment {
            val fragment = ZhihuFirstFragment()
            fragment.arguments = Bundle()
            return fragment
        }
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return inflater.inflate(R.layout.zhihu_fragment_first, container, false)
    }

    override fun onLazyInitView(savedInstanceState: Bundle?) {
        super.onLazyInitView(savedInstanceState)
        if (findChildFragment(FirstHomeFragment::class.java)==null) loadRootFragment(R.id.fl_first_container,FirstHomeFragment.newInstance())
    }
}